package com.itheima.d3_transform_stream;


import java.io.FileInputStream;
import java.io.InputStreamReader;

/**
 * 目标：掌握字符输入转换流的作用。
 */
public class Test2InputStreamReader {
    public static void main(String[] args) {
        try(
                //创建字符输入转换流
                FileInputStream fis = new FileInputStream("day10io-app2/file/File03.txt");
                InputStreamReader isr = new InputStreamReader(fis,"GBK");
        ){
            int c;
            while((c = isr.read())!=-1){
                System.out.println((char)c);
            }


        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
